<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title data-i18n="popup.meta.title">BIC-QA - 佰晟智算智能问答助手</title>
    <link rel="stylesheet" href="popup.css">
</head>

<body>
    <div class="container">
        <!-- 左侧边栏 -->
        <aside class="sidebar">
            <!-- Logo区域 -->
            <div class="logo-section">
                <div class="logo-content">
                    <img src="icons/logo.png" class="logo-icon" alt="BIC-QA" data-i18n-alt="popup.meta.logoAlt">
                </div>
            </div>

            <!-- 快捷操作区域 -->
            <div class="quick-actions-sidebar">
                <div class="action-buttons-vertical">
                    <button id="newSessionBtn" class="sidebar-action-btn">
                        <span class="action-icon">🆕</span>
                        <span class="action-text" data-i18n="popup.top.button.newSession">开启新会话</span>
                    </button>
                    <button id="historyBtn" class="sidebar-action-btn">
                        <span class="action-icon">📚</span>
                        <span class="action-text" data-i18n="popup.top.button.history">历史记录</span>
                    </button>
                    <button id="awrAnalysisBtn" class="sidebar-action-btn">
                        <span class="action-icon">📊</span>
                        <span class="action-text" data-i18n="popup.top.button.awrAnalysis">AWR分析</span>
                    </button>
                    <!-- <button id="inspectionBtn" class="sidebar-action-btn">
                        <span class="action-icon">🛠️</span>
                        <span class="action-text" data-i18n="popup.top.button.inspection">巡检诊断</span>
                    </button> -->

                    <!-- 使用说明按钮 -->
                    <button id="helpBtn" class="sidebar-action-btn help-action-btn" title="使用说明"
                        data-i18n-title="popup.top.tooltip.help">
                        <span class="action-icon">❓</span>
                        <span class="action-text" data-i18n="popup.top.button.help">使用说明</span>
                    </button>

                    <!-- 公告按钮 -->
                    <button id="announcementBtn" class="sidebar-action-btn announcement-btn" title="公告"
                        data-i18n-title="popup.top.tooltip.notice">
                        <span class="action-icon">📢</span>
                        <span class="action-text" data-i18n="popup.top.button.notice">公告</span>
                    </button>
                </div>
            </div>

            <!-- 版本信息 -->
            <div class="help-section">
                <div class="version-info">
                    <p class="version-text" data-i18n-html="popup.meta.version">BIC-QA <span>v1.0.8.2</span></p>
                </div>
            </div>

        </aside>

        <!-- 右侧主内容区域 -->
        <main class="main-content">

            <!-- 搜索和问答区域 -->
            <div class="content-area">
                <!-- 搜索区域 -->
                <div class="search-section">
                    <div class="selector-row">
                        <div class="selector-left">
                            <div class="model-selector">
                                <label for="modelSelect" data-i18n="popup.main.label.model">选择模型：</label>
                                <select id="modelSelect" class="model-select">
                                    <option value="" disabled data-i18n="popup.main.option.modelsLoading">加载中...</option>
                                </select>
                            </div>
                            <span class="selector-divider">/</span>
                            <div class="knowledge-base-selector">
                                <label for="knowledgeBaseSelect" data-i18n="popup.main.label.knowledge">选择知识库：</label>
                                <select id="knowledgeBaseSelect" class="knowledge-base-select">
                                    <option value="" data-i18n="popup.main.option.knowledgeNone">不使用知识库</option>
                                </select>
                            </div>
                            <span class="selector-divider">/</span>
                            <div class="parameter-rule-selector">
                                <label for="parameterRuleSelect" data-i18n="popup.main.label.parameter">参数规则：</label>
                                <select id="parameterRuleSelect" class="parameter-rule-select">
                                    <option value="" disabled data-i18n="popup.main.option.modelsLoading">加载中...</option>
                                </select>
                            </div>
                        </div>
                        <div class="selector-right">
                            <div class="language-switcher">
                                <select id="languageSwitcher" class="language-select" title="选择语言"
                                    data-i18n-title="popup.top.tooltip.languageSwitcher">
                                    <option value="" disabled selected data-i18n="popup.top.languageOptions.placeholder">选择语言 (Select Language)</option>
                                    <option value="zhcn" data-i18n="popup.top.languageOptions.zhcn">中文简体</option>
                                    <option value="en" data-i18n="popup.top.languageOptions.en">English</option>
                                    <!-- <option value="zh-tw" data-i18n="popup.top.languageOptions.zh-tw">中文(繁體)</option> -->
                                    <option value="jap" data-i18n="popup.top.languageOptions.jap">日本語</option>
                                </select>
                            </div>
                            <button id="settingsBtn" class="settings-button" title="设置"
                                data-i18n-title="popup.top.tooltip.settings">
                                <span class="settings-icon">⚙️</span>
                                <span data-i18n="popup.top.button.settings">设置</span>
                            </button>
                        </div>
                    </div>

                    <!-- 结果区域 -->
                    <div class="result-section">
                        <div id="resultContainer" class="result-container" style="display: none;">
                            <div class="conversation-container" id="conversation-default">
                                <div class="resultListShow">
                                    <div id="questionDisplay" class="question-display" style="display: none;">
                                        <div class="question-header">
                                            <div class="user-avatar">
                                                <img src="icons/bic-user.png" class="avatar-img" alt="用户"
                                                    data-i18n-alt="popup.result.userAlt">
                                            </div>
                                            <div class="question-info">
                                                <!-- <div class="question-name" data-i18n="popup.result.userName">用户</div> -->
                                                <div class="question-time" id="questionTime"></div>
                                            </div>
                                        </div>
                                        <div class="question-content">
                                            <div id="questionText" class="question-text"></div>
                                        </div>
                                    </div>

                                    <div id="aiDisplay" class="ai-display" style="display: none;">
                                        <div class="ai-header">
                                            <div class="ai-avatar">
                                                <img src="icons/bic-an.png" class="avatar-img" alt="BIC-QA"
                                                    data-i18n-alt="popup.result.aiAlt">
                                            </div>
                                            <div class="ai-info">
                                                <div class="ai-name" data-i18n="popup.result.aiName">BIC-QA</div>
                                                <div class="ai-time" id="aiTime"></div>
                                            </div>
                                        </div>
                                    </div>

                                    <h3 class="result-title" data-i18n="popup.result.title">回答：</h3>
                                    <div id="resultText" class="result-text">
                                        <p class="result-text-tips"></p>
                                        <div class="result-text-content"></div>
                                        <div class="result-text-knowlist"></div>

                                    </div>
                                    <div class="result-actions">
                                        <div class="action-icons-row">
                                            <button id="exportButton" class="action-icon-btn export-btn" title="导出HTML"
                                                data-i18n-title="popup.result.actions.exportTitle">
                                                <img src="icons/download.svg" class="action-icon-svg" alt="导出"
                                                    data-i18n-alt="popup.result.actions.exportAlt">
                                            </button>
                                            <button id="copyButton" class="action-icon-btn copy-btn" title="复制"
                                                data-i18n-title="popup.result.actions.copyTitle">
                                                <img src="icons/copy.svg" class="action-icon-svg" alt="复制"
                                                    data-i18n-alt="popup.result.actions.copyAlt">
                                            </button>
                                            <button id="clearButton" class="action-icon-btn clear-btn" title="清空"
                                                data-i18n-title="popup.result.actions.clearTitle">
                                                <img src="icons/clear.svg" class="action-icon-svg" alt="清空"
                                                    data-i18n-alt="popup.result.actions.clearAlt">
                                            </button>
                                            <button id="likeButton" class="action-icon-btn like-btn" title="点赞 - 回答有帮助"
                                                data-i18n-title="popup.result.actions.likeTitle">
                                                <img src="icons/good.svg" class="action-icon-svg" alt="点赞"
                                                    data-i18n-alt="popup.result.actions.likeAlt">
                                            </button>
                                            <button id="dislikeButton" class="action-icon-btn dislike-btn"
                                                title="否定 - 回答没有帮助"
                                                data-i18n-title="popup.result.actions.dislikeTitle">
                                                <img src="icons/bad.svg" class="action-icon-svg" alt="否定"
                                                    data-i18n-alt="popup.result.actions.dislikeAlt">
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="input-center-wrapper">
                        <div class="input-header">
                            <h2 class="input-title" data-i18n="popup.input.title">BIC-QA</h2>
                            <p class="input-subtitle" data-i18n="popup.main.text.databaseIntelligentQa"></p>

                        </div>
                        <div class="input-container">
                            <textarea id="questionInput" class="question-input"
                                data-i18n-placeholder="popup.input.placeholder" rows="3"></textarea>
                            <div class="character-count">
                                <span id="charCount">0</span><span data-i18n="popup.input.charLimitSuffix">/500</span>
                            </div>
                            <button id="askButton" class="ask-button" title="提问"
                                data-i18n-title="popup.input.askTitle">
                                <span class="send-icon">↑</span>
                                <span class="stop-icon" style="display: none;">⏹</span>
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 底部版本信息 -->
                <footer class="footer">
                    <p class="input-subtitle" data-i18n-html="popup.footer.motto"></p>
                </footer>
            </div>

            <!-- 回到顶部按钮 -->
            <button id="backToTopBtn" class="back-to-top-btn" title="回到顶部" style="display: none;"
                data-i18n-title="popup.common.backToTopTitle">
                <span class="back-to-top-icon">↑</span>
            </button>
        </main>

        <!-- 历史记录对话框 -->
        <div id="historyDialog" class="dialog-overlay" style="display: none;">
            <div class="dialog-container">
                <div class="dialog-header">
                    <h3 data-i18n="popup.history.title">对话历史记录</h3>
                    <button id="closeHistoryDialog" class="close-btn" aria-label="关闭"
                        data-i18n-aria-label="popup.common.close">×</button>
                </div>
                <div class="dialog-content">
                    <div class="history-controls" style="display: none;">
                        <button id="clearHistoryBtn" class="clear-btn" data-i18n="popup.history.clear">清空历史</button>
                        <button id="exportHistoryBtn" class="export-btn" style="display: none;"
                            data-i18n="popup.history.export">导出历史</button>
                    </div>
                    <div id="historyList" class="history-list">
                        <!-- 历史记录将在这里动态生成 -->
                    </div>
                </div>
            </div>
        </div>

        <!-- AWR分析对话框 -->
        <div id="awrAnalysisDialog" class="dialog-overlay" style="display: none;">
            <div class="dialog-container awr-dialog-container">
                <div class="dialog-header">
                    <h3 data-i18n="popup.awr.title">AWR分析</h3>
                    <button id="closeAwrDialog" class="close-btn" aria-label="关闭"
                        data-i18n-aria-label="popup.common.close">×</button>
                </div>

                <!-- 选项卡导航 -->
                <div class="awr-tabs">
                    <button class="awr-tab-btn active" data-tab="new" data-i18n="popup.awr.tabs.new">新建分析</button>
                    <button class="awr-tab-btn" data-tab="history" data-i18n="popup.awr.tabs.history">历史记录</button>
                </div>

                <div class="dialog-content">
                    <!-- 新建分析表单视图 -->
                    <div id="awrNewAnalysisView" class="awr-tab-content active">
                        <form id="awrAnalysisForm" class="awr-form">
                            <!-- 数据库类型选择 -->
                            <div class="form-group">
                                <label for="awrDatabaseType" class="form-label required"
                                    data-i18n="popup.awr.form.databaseLabel">数据库类型</label>
                                <select id="awrDatabaseType" class="form-input" required>
                                    <option value="" data-i18n="popup.awr.form.databasePlaceholder">请选择数据库类型</option>
                                    <option value="2101" data-i18n="popup.awr.form.databaseOptions.oracle">Oracle（集中式数据库）</option>
                                    <option value="2114" data-i18n="popup.awr.form.databaseOptions.kingbase">KingBase（集中式数据库）</option>
                                </select>
                            </div>

                            <!-- 系统问题概述 -->
                            <div class="form-group">
                                <label for="awrProblemDescription" class="form-label"
                                    data-i18n="popup.awr.form.problemLabel">系统问题概述</label>
                                <textarea id="awrProblemDescription" class="form-textarea" rows="4"
                                    data-i18n-placeholder="popup.awr.form.problemPlaceholder"></textarea>
                                <p class="form-description" data-i18n="popup.awr.form.problemDescription">
                                    填写相对明确的系统问题，不确定不用输入，否则会误导大模型。
                                </p>
                            </div>

                            <!-- 接收邮箱 -->
                            <div class="form-group">
                                <label for="awrEmail" class="form-label required"
                                    data-i18n="popup.awr.form.emailLabel">接收邮箱</label>
                                <input type="email" id="awrEmail" class="form-input" required
                                    data-i18n-placeholder="popup.awr.form.emailPlaceholder" />
                                <input type="hidden" id="awrUserName" class="form-input" />
                            </div>

                            <!-- 上传文件 -->
                            <div class="form-group">
                                <label for="awrFileDisplay" class="form-label required"
                                    data-i18n="popup.awr.form.uploadLabel">上传文件</label>
                                <div class="file-upload-container">
                                    <input type="text" id="awrFileDisplay" class="form-input file-display-input"
                                        data-i18n-placeholder="popup.awr.form.uploadPlaceholder" readonly />
                                    <input type="file" id="awrFileInput" class="file-input-hidden" accept="*/*" />
                                    <button type="button" id="awrFileUploadBtn" class="file-upload-btn"
                                        data-i18n="popup.awr.form.uploadButton">上传文件</button>
                                </div>
                            </div>

                            <!-- 语言选择 -->
                            <div class="form-group">
                                <label for="awrLanguage" class="form-label"
                                    data-i18n="popup.awr.form.languageLabel">语言</label>
                                <select id="awrLanguage" class="form-input">
                                    <option value="zh" data-i18n="popup.awr.form.languageOptions.zh" selected>中文</option>
                                    <option value="en" data-i18n="popup.awr.form.languageOptions.en">English</option>
                                </select>
                            </div>

                            <div style="display: flex;align-items: center;justify-content: space-between;">
                                <div class="agreement-section">
                                    <label class="agreement-label"
                                        style="display: flex;align-items: center;gap: 10px;">
                                        <input type="checkbox" id="agreeTerms" name="agreeTerms">
                                        <span class="checkbox-text" style="display: inline-block;">
                                            <span data-i18n="popup.awr.agreement.prefix">我已阅读并同意 </span>
                                            <button type="button" class="link-button js-open-policy"
                                                data-target="disclaimerDialogZh" id="agreementDisclaimerBtn"
                                                data-i18n="popup.awr.agreement.disclaimer">免责声明</button>
                                            <span data-i18n="popup.awr.agreement.and"> 和 </span>
                                            <button type="button" class="link-button js-open-policy"
                                                data-target="securityDialogZh" id="agreementSecurityBtn"
                                                data-i18n="popup.awr.agreement.security">安全声明</button>
                                            <span data-i18n="popup.awr.agreement.suffix">，同意上传 AWR 报告进行分析。</span>
                                        </span>
                                    </label>
                                </div>
                                <!-- 操作按钮 -->
                                <div class="form-actions">
                                    <button type="button" id="awrCancelBtn" class="btn-cancel"
                                        data-i18n="popup.main.action.close">关闭</button>
                                    <button type="submit" id="awrSaveBtn" class="btn-save"
                                        data-i18n="popup.main.action.runAnalysis">执行分析</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <!-- 历史记录列表视图 -->
                    <div id="awrHistoryView" class="awr-tab-content">
                        <!-- 搜索和筛选区域 -->
                        <div class="awr-history-filters">
                            <label for="awrStartTime" class="awr-filter-label"
                                data-i18n="popup.awr.filters.start">开始时间：</label>
                            <input type="text" id="awrStartTime" class="form-input awr-filter-input datetime-filter-input"
                                data-role="datetime-filter" data-target="start"
                                data-i18n-placeholder="popup.awr.filters.startPlaceholder" readonly autocomplete="off">

                            <label for="awrEndTime" class="awr-filter-label"
                                data-i18n="popup.awr.filters.end">结束时间：</label>
                            <input type="text" id="awrEndTime" class="form-input awr-filter-input datetime-filter-input"
                                data-role="datetime-filter" data-target="end"
                                data-i18n-placeholder="popup.awr.filters.endPlaceholder" readonly autocomplete="off">

                            <label for="awrStatusFilter" class="awr-filter-label"
                                data-i18n="popup.awr.filters.status">任务状态：</label>
                            <select id="awrStatusFilter" class="form-input awr-filter-select">
                                <option value="" data-i18n="popup.awr.statusOptions.all">全部</option>
                                <option value="0" data-i18n="popup.awr.statusOptions.pending">未分析</option>
                                <option value="1" data-i18n="popup.awr.statusOptions.success">成功</option>
                                <option value="2" data-i18n="popup.awr.statusOptions.failed">失败</option>
                                <option value="3" data-i18n="popup.awr.statusOptions.running">执行中</option>
                            </select>

                            <button id="awrRefreshHistoryBtn" class="awr-search-btn"
                                data-i18n="popup.awr.filters.search">搜索</button>

                            <button id="awrResetBtn" class="awr-reset-btn"
                                data-i18n="popup.awr.filters.reset">重置</button>
                        </div>

                        <!-- 历史记录表格 -->
                        <div class="awr-history-table-container">
                            <table id="awrHistoryTable" class="awr-history-table">
                                <thead>
                                    <tr>
                                        <th data-i18n="popup.awr.table.createdAt">创建时间</th>
                                        <th data-i18n="popup.awr.table.status">状态</th>
                                        <th data-i18n="popup.awr.table.filename">文件名</th>
                                        <th data-i18n="popup.awr.table.description">问题描述</th>
                                        <th data-i18n="popup.awr.table.email">邮箱</th>
                                        <th data-i18n="popup.awr.table.language">语言</th>
                                        <th data-i18n="popup.awr.table.actions">操作</th>
                                    </tr>
                                </thead>
                                <tbody id="awrHistoryList">
                                    <!-- 表格行将通过JS动态生成 -->
                                </tbody>
                            </table>
                        </div>

                        <!-- 分页控件 -->
                        <div class="awr-pagination">
                            <button id="awrPrevPageBtn" class="pagination-btn" disabled
                                data-i18n="popup.awr.pagination.prev">上一页</button>
                            <span id="awrPageInfo" class="pagination-info"></span>
                            <button id="awrNextPageBtn" class="pagination-btn" disabled
                                data-i18n="popup.awr.pagination.next">下一页</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 巡检诊断对话框 -->
        <div id="inspectionDialog" class="dialog-overlay" style="display: none;">
            <div class="dialog-container inspection-dialog-container">
                <div class="dialog-header">
                    <h3 data-i18n="popup.inspection.title">巡检诊断</h3>
                    <button id="closeInspectionDialog" class="close-btn" aria-label="关闭"
                        data-i18n-aria-label="popup.common.close">×</button>
                </div>
                <div class="dialog-content">
                    <form id="inspectionForm" class="awr-form">
                        <div class="form-group">
                            <label for="inspectionDatabaseType" class="form-label required"
                                data-i18n="popup.inspection.form.databaseLabel">数据库类型</label>
                            <select id="inspectionDatabaseType" class="form-input" required>
                                <option value="" data-i18n="popup.inspection.form.databasePlaceholder">请选择数据库类型</option>
                                <option value="2101" data-i18n="popup.awr.form.databaseOptions.oracle">Oracle（集中式数据库）</option>
                                <option value="2114" data-i18n="popup.awr.form.databaseOptions.kingbase">KingBase（集中式数据库）</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="inspectionProblemDescription" class="form-label"
                                data-i18n="popup.inspection.form.problemLabel">问题描述</label>
                            <textarea id="inspectionProblemDescription" class="form-textarea" rows="4"
                                data-i18n-placeholder="popup.inspection.form.problemPlaceholder"></textarea>
                            <p class="form-description" data-i18n="popup.inspection.form.problemDescription">
                                请尽量提供明确的问题描述，以便我们生成更准确的诊断结果。
                            </p>
                        </div>
                        <div class="form-group">
                            <label for="inspectionEmail" class="form-label required"
                                data-i18n="popup.inspection.form.emailLabel">接收邮箱</label>
                            <input type="email" id="inspectionEmail" class="form-input" required
                                data-i18n-placeholder="popup.inspection.form.emailPlaceholder" />
                            <input type="hidden" id="inspectionUserName" class="form-input" />
                        </div>
                        <div class="form-group">
                            <label for="inspectionFileDisplay" class="form-label required"
                                data-i18n="popup.inspection.form.uploadLabel">上传文件</label>
                            <div class="file-upload-container">
                                <input type="text" id="inspectionFileDisplay" class="form-input file-display-input"
                                    data-i18n-placeholder="popup.inspection.form.uploadPlaceholder" readonly />
                                <input type="file" id="inspectionFileInput" class="file-input-hidden" accept="*/*" />
                                <button type="button" id="inspectionFileUploadBtn" class="file-upload-btn"
                                    data-i18n="popup.inspection.form.uploadButton">上传文件</button>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inspectionLanguage" class="form-label"
                                data-i18n="popup.inspection.form.languageLabel">语言</label>
                            <select id="inspectionLanguage" class="form-input">
                                <option value="zh" data-i18n="popup.inspection.form.languageOptions.zh" selected>中文</option>
                                <option value="en" data-i18n="popup.inspection.form.languageOptions.en">English</option>
                            </select>
                        </div>
                        <div style="display: flex;align-items: center;justify-content: space-between;">
                            <div class="agreement-section">
                                <label class="agreement-label"
                                    style="display: flex;align-items: center;gap: 10px;">
                                    <input type="checkbox" id="inspectionAgreeTerms" name="inspectionAgreeTerms">
                                    <span class="checkbox-text" style="display: inline-block;">
                                        <span data-i18n="popup.inspection.agreement.prefix">我已阅读并同意 </span>
                                        <button type="button" class="link-button js-open-policy"
                                            data-target="disclaimerDialogZh"
                                            data-i18n="popup.inspection.agreement.disclaimer">免责声明</button>
                                        <span data-i18n="popup.inspection.agreement.and"> 和 </span>
                                        <button type="button" class="link-button js-open-policy"
                                            data-target="securityDialogZh"
                                            data-i18n="popup.inspection.agreement.security">安全声明</button>
                                        <span data-i18n="popup.inspection.agreement.suffix">，同意上传巡检报告进行诊断。</span>
                                    </span>
                                </label>
                            </div>
                            <div class="form-actions">
                                <button type="button" id="inspectionCancelBtn" class="btn-cancel"
                                    data-i18n="popup.main.action.close">关闭</button>
                                <button type="submit" id="inspectionSaveBtn" class="btn-save"
                                    data-i18n="popup.inspection.form.submit">提交诊断</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <!-- 免责声明弹窗（中文化） -->
        <div id="disclaimerDialogZh" class="dialog-overlay policy-dialog" style="display: none;" role="dialog"
            aria-modal="true" aria-labelledby="disclaimerDialogZhTitle" aria-hidden="true">
            <div class="dialog-container policy-dialog-container">
                <div class="dialog-header">
                    <h3 id="disclaimerDialogZhTitle" data-i18n="popup.policy.disclaimer.title">免责声明</h3>
                    <button type="button" class="close-btn js-close-policy" data-target="disclaimerDialogZh"
                        aria-label="关闭" data-i18n-aria-label="popup.policy.disclaimer.closeAria">×</button>
                </div>
                <div class="dialog-content policy-dialog-content"
                    data-i18n-html="popup.policy.disclaimer.content"></div>
            </div>
        </div>

        <!-- 免责声明弹窗（英文） -->
        <div id="disclaimerDialogEn" class="dialog-overlay policy-dialog" style="display: none;" role="dialog"
            aria-modal="true" aria-labelledby="disclaimerDialogEnTitle" aria-hidden="true">
            <div class="dialog-container policy-dialog-container">
                <div class="dialog-header">
                    <h3 id="disclaimerDialogEnTitle" data-i18n="popup.policy.disclaimer.title">Disclaimer</h3>
                    <button type="button" class="close-btn js-close-policy" data-target="disclaimerDialogEn"
                        aria-label="Close" data-i18n-aria-label="popup.policy.disclaimer.closeAria">×</button>
                </div>
                <div class="dialog-content policy-dialog-content"
                    data-i18n-html="popup.policy.disclaimer.content"></div>
            </div>
        </div>

        <!-- 安全声明弹窗（中文化） -->
        <div id="securityDialogZh" class="dialog-overlay policy-dialog" style="display: none;" role="dialog"
            aria-modal="true" aria-labelledby="securityDialogZhTitle" aria-hidden="true">
            <div class="dialog-container policy-dialog-container">
                <div class="dialog-header">
                    <h3 id="securityDialogZhTitle" data-i18n="popup.policy.security.title">安全声明</h3>
                    <button type="button" class="close-btn js-close-policy" data-target="securityDialogZh"
                        aria-label="关闭" data-i18n-aria-label="popup.policy.security.closeAria">×</button>
                </div>
                <div class="dialog-content policy-dialog-content"
                    data-i18n-html="popup.policy.security.content"></div>
            </div>
        </div>

        <!-- 安全声明弹窗（英文） -->
        <div id="securityDialogEn" class="dialog-overlay policy-dialog" style="display: none;" role="dialog"
            aria-modal="true" aria-labelledby="securityDialogEnTitle" aria-hidden="true">
            <div class="dialog-container policy-dialog-container">
                <div class="dialog-header">
                    <h3 id="securityDialogEnTitle" data-i18n="popup.policy.security.title">Security Statement</h3>
                    <button type="button" class="close-btn js-close-policy" data-target="securityDialogEn"
                        aria-label="Close" data-i18n-aria-label="popup.policy.security.closeAria">×</button>
                </div>
                <div class="dialog-content policy-dialog-content"
                    data-i18n-html="popup.policy.security.content"></div>
            </div>
        </div>

        <script src="js/knowledge_base_simple.js"></script>
        <script src="i18n/i18n.js"></script>
        <script src="popup.js"></script>
        <script src="js/help-button.js"></script>
    </div>
</body>

</html>
